package my.app.timer;

import java.io.File;
import java.util.ArrayList;

public class FileWalker 
{

    public void walk(File root, ArrayList<SongEntry> songList) 
    {
        File[] list = root.listFiles();
        
        
        for (File f : list) 
        {
            if (f.isDirectory()) 
            {            	
            	songList.add(new SongEntry(null, f.getName()));
                f.getAbsoluteFile();
                walk(f,songList);
            }
            else 
            {           	
            	if(f.getAbsolutePath().matches(".*\\.mp3"))
            		songList.add(new SongEntry(f.getAbsolutePath(),f.getName()));
            }
        }
    }
};